#ifndef JAE_NODE_H_
#define JAE_NODE_H_

#include "list.h"
#include "objectMS3D.h"
#include "objectDL.h"
#include "objectTerrain.h"
#include "camera.h"
#include "light.h"

/****************************************************//**
 * Project-Namespace
 ********************************************************/
namespace jae
{

/****************************************************//**
 * Saves the position and roation of a node.
 ********************************************************/
class Node : public Object
{
public:

    Node(GLfloat aX = 0.0f, GLfloat aY = 0.0f, GLfloat aZ = 0.0f);
    virtual ~Node();
    virtual void render();
    void updateGLLights();
    bool isEmpty();
    
    Node* createChildNode();
    void deleteAllChilds();
    Camera* createCamera();
    Light* createLight(GLenum aFreeLightIndex);
    ObjectMS3D* createChildObjectMS3D(const char* aFilename, TextureManager* aTextureManager = NULL);
    ObjectTerrain* createChildObjectTerrain(const char* aFilename, TextureManager* aTextureManager);
    ObjectDL* createChildObjectDL(GLuint aDisplayListIndex);
    Node* isInChildNode(Object *aObject);
    bool isInNode(Object *aObject);
private:
    
    List<Node>* _pChildNodeList;
    List<Object>* _pObjectList;
    List<Light>* _pLightList;
    
};


} //namespace

#endif /*JAE_NODE_H_*/
